# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年07月09日
"""
from docx import Document
file=Document(".\练习\练习2.docx")
# print(File.paragraphs[0])
# for para in File.paragraphs:
# 	print(para.text)
# para1 = File.paragraphs[0]
# print(para1.text)
# run1 = para1.runs
# for txt in run1:
# 	print(txt.text)
n=0
i = 0
for para in file.paragraphs:
	if "孙兴华" in para.text:
		n+=1



for table in file.tables:
	for row in table.rows:
		for cell in row.cells:
			if "孙兴华" in cell.text:
				i += 1

print(i+n)
